/**
 * 
 */
package soa.security.mgr.service.base;

import java.util.List;

import soa.security.domain.Account;
import soa.security.domain.Department;
import soa.security.domain.Organization;
import soa.security.domain.OrganizationUnit;
import soa.security.domain.Region;
import soa.security.domain.SoaTop;
import soa.security.exception.OrganizationException;
import soa.security.jpa.domain.Change;

/**
 * @author CreGu
 *
 */
public interface BaseMgrService {
	boolean exist(String organizationId);

	Organization findOrganization(String organizationUid);;

	boolean modelOverrided();

	void validateOrganization(String organizationId)
			throws OrganizationException;

	String findMaxNumber(final Class<?> clazz);

	void remove(String dn);

	void sort(String dns);

	public OrganizationUnit gainOrganizationUnit(String organizationId,
			String ou);
	
	public OrganizationUnit gainOrganizationUnit_region(String organizationId,
			String ou);

	public List<Department> findDepartments(String organizationId,
			String attrName, String dn);
	
	public List<Account> findAccounts(String organizationId, String attrName, String dn);
	
	public List<Account> findAccounts_region(String regionDn, String attrName, String dn);

	Change change(String organizationId, SoaTop st);
	
	public Region findRegion(String regionId);
}
